1. Field of the Invention
This invention relates generally to the computer controlled printing, displaying or other presentation of documents which may have text, graphical components, and/or images and more particularly to a method and systems for processing the beginning and ending of pictures or pagesets in a document data stream, as well as other data which might be defined in the document data stream. This invention also relates to methodology for keeping track of the scope or status of the presentation device. In this context the presentation of a document on a page involves the printing on a fixed medium such as paper, transparency or the like, the page, or presenting on a visual display the page or transmitting to another device the document in a form to be presented or stored. The present application is related to commonly owned co-pending U.S. patent application Ser. No. 07/778,578 filed on Oct. 17, 1991, the disclosure of which is incorporated by reference herein. The present application is also related to commonly owned concurrently filed U.S. patent application Ser. No. 07/876,251 entitled "A Method and System to Handle Inclusion of External Files into a Document Processing Language", filed Apr. 30, 1992, also incorporated by reference herein.
2. Discussion of the Background
The development of laser printers in the early 1970s provided an opportunity for high quality and low cost printing of documents which contain not only character data but also generalized graphical material. The primary method of controlling these types of printers was by means of commands employing a so-called "escape sequence", which commands are similar to the type of commands used in a DIABLO.RTM. command sequence. These commands were distinguished from typical character data in a data stream by preceding the command with a special byte, generally an escape character (ASCII 27). This methodology was acceptable for low speed devices and for devices which print limited amounts of graphics, such as daisy wheel or dot matrix printers, but was not well suited for printing documents that combine significant amounts of text and graphical materials because no provision was made for the large amount of data that a graphic might employ.
In response to the limitations inherent in the escape sequence type of control, different types of "page description language" (PDL) were developed in general to control laser or other types of page printers. A backward compatibility was provided in most of these laser printers in that they were able to simulate conventional escape sequence commands such as might be found in the aforementioned DIABLO.RTM. or EPSON.RTM. type of printers. Examples of the conventional page description language which were developed in response to the limitations inherent in escape sequence commands were the PostScript.RTM. system from Adobe Systems, Inc. and Interpress.RTM. from Xerox. Other types of proprietary PDL's were also created to circumvent the limitations attendant to the use of escape sequence commends.
One of the shortcomings of the conventional page description languages such as PostScript.RTM., becomes evident in relation to the provisions that are made so that a particular document may contain a new definition, such as a new resource definition (e.g., an additional font or graphic which is to be used in the document) or a new dictionary definition. These new definitions might appear anywhere within a document data stream and are difficult to process and identify. As a result, the entire contents of a document must be inspected in order to determine whether or not a given printer has resources which are capable and necessary to print a particular document or to process the document in the manner desired. As a consequence, it is possible for the printing of a document to fail at any point during the printing process, including near the very end of processing, due to the inability of the printer to comply with the commands contained within the document's page description language.
Another problem associated with a PostScript.RTM. type system is that in order to print a given page of a document, if it is not the first page, it is necessary to read the entire PDL description of all the preceding pages of the document in order to determine the state of the document page set up parameters (i.e., resource declaration, dictionary definition or the like) before the processing for a specified page can be accomplished. In other words, the print controller or a print driver program must read the entire PDL document data stream to take into account the effect of every page set up command which might change the state of the printing between the beginning of the document and the specified page. Although this scanning is relatively straightforward, it requires a significant amount of processing and consequently is an ineffective solution to the problem. It further is complicated in that identification of the beginning and end of pages and graphics in PostScript.RTM. documents is not very straightforward and involves significant processing. PostScript developed the Document Structuring Convention using comments to distinguish various resources and page breaks. However, this is the convention and there is nothing in the description language to enforce this convention. The violation of convention does not flag the errors.
The prior art page description languages including PostScript and InterPress providing various improvements to the conventional escape sequences, such as providing tools for such items as resource declarations, context declarations, dictionaries, the use of memory stacks or the like. These languages also in some cases allowed for dynamic changes in the printers state such as the ability to add fonts or to add graphical images to the resources that might be available to the printer. Some of these features are documented in such generally available reference works as Adobe System Incorporated's "PostScript Language Reference Manual" and the "PostScript Language Program Design", both by Addison-Wesley Publishing Company. Other PDL's are likewise described in various technical and reference books such as "Interpress, The Source Book" by Harrington et. al. (Simon and Schuster, Inc. ,1988)
One of the problems as noted above with respect to the PostScript system is that an identification of the beginning and end of an image or a page requires a significant amount of processing and these languages do not provided a logical manner in which the preparation of the document may require significant extra processing to determine these items. In fact a processing "as if printing" of the entire document is needed even if only one page or a section of pages such as a chapter in a long document are needed. Further the processing may not be straightforward or simple enough to allow for lower cost processors to be used at the printer/display device. This problem adds to the cost or reduces the flexibility of the prior art systems. A basis for a proposed standardized page description language has been made by several people including the inventors herein and is in the process of being developed as an international standard. The proposal at this stage is in draft form before a section of the ISO as ISO/IEC DIS 10180 labeled as "Information Processing- Text Communication- Standard Page Description Language". The current draft is dated 1991.